- include_stylesheet 'admin/comments'

.outset
  %table#comments.index
    %thead
      %tr
        %th= t('comment')
        - unless @page
          %th= t('page')
        %th= t('date_string')
        %th= t('author')
        %th.actions= t('actions')
    %tbody
      = render(:partial => "comment", :collection => @comments) || %Q[<tr><td class="note" colspan="#{@page ? 4 : 5}">No comments</td></tr>]

#actions
  = will_paginate @comments
  %ul
    %li.all
      = link_to "#{image('comments')} #{t('comment_states.all')}", "/admin/comments/all"
    %li.approved
      = link_to "#{image('accept')} #{t('comment_states.approved')}", "/admin/comments/approved"
    %li.unapproved
      = link_to "#{image('error')} #{t('comment_states.unapproved')}", "/admin/comments/unapproved"
    %li
      = link_to "#{image('comments_delete')} #{t('delete_unapproved')}", destroy_unapproved_admin_comments_url, :class => 'delete-unapproved', :method => :delete, :confirm => 'Delete all unapproved comments?'
    %li
      = link_to "#{image('table_save')} #{t('download_csv')}", :format => :csv
